<template>
  <RouterView name="emailLayout">
    <template #default="{ Component, route }">
      <transition :name="route.name" mode="out-in" appear>
        <div :key="route.name">
          <component :is="Component" :key="route.fullPath" />
        </div>
      </transition>
    </template>
  </RouterView>
</template>

<script lang="ts">
  import { computed, defineComponent, unref, h } from 'vue';

  import { useRoute, useRouter } from 'vue-router';

  export default defineComponent({
    name: 'EmailLayout',
    components: {},
    setup() {
      const curRoute = useRoute();
      const router = useRouter();
      console.log('route', { curRoute, router, getRoutes: router.getRoutes() });

      return {
        curRoute,
      };
    },
  });
</script>
